package apiday04.io;


import java.io.FileOutputStream;
import java.io.IOException;

public class FOSDemo {
    public static void main(String[] args) throws IOException {
        FileOutputStream fos = new FileOutputStream("fos.dat");//若无该文件则自动创建，若路径不正确则无法创建

        fos.write(1);
        fos.write(2);
        System.out.println("写出完毕！");
        fos.close();

    }
}
